// Const class


#include <iostream>
#include <cstring>
using namespace std;


class Integer {
	public:
		void sentinfo( int i ) {	// condition one
			this->i = i;
		}

		void getinfo( ) {
			cout << "This is not a const function : " << i << endl;
		}

		void getinfo( ) const {		// This is a const function.
			// ...			// They can be overload relation
			i = 9;
			cout << "This is a const function : " << i << endl;
		}

	private:
		mutable int i;
};


// desinger
// -------------------------------------------------------------------
// user


int main( void ) {
	Integer ix;
	ix.sentinfo( 1000 );
	ix.getinfo( );
	
	const Integer cix = ix; 		// This is a const class
	cix.getinfo( );

	return 0;
}

